﻿using GlobalStringFormatter;
using Ninject;

namespace Samples.DependencyInjectedConsole.Accounts
{
    public class Currency { }

    class Account
    {
        [Inject]
        public IGString<Currency, double> Amount { get; set; }

        public void Set(double value)
        {
            Amount.Value = value;
        }

        public void Clear()
        {
            Amount.Value = 0;
        }

        public void Add(double value)
        {
            Amount.Value += value;
        }

        public void Subtract(double value)
        {
            Amount.Value -= value;
        }
    }
}
